import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: '首页',
    component: Home,
    meta:{
      flag:true,
    }
  },
  {
    path: '/ind',
    name: '首页',
    component: () => import('../views/Home.vue'),
    meta:{
      flag:true,
    }
  },
  {
    path: '/about',
    name: '精选',
    component: () => import('../views/About.vue'),
    meta:{
      flag:true,
    }
  },
  {
    path: '/gou',
    name: '购物车',
    component: () => import('../views/Gou.vue'),
    meta:{
      flag:true,
    }
  },
  {
    path: '/wo',
    name: '我的',
    component: () => import('../views/Wo.vue'),
    meta:{
      flag:true,
    }
  },
  {
    path: '/reg',
    name: '登录',
    component: () => import('../components/Register.vue'),
    meta:{
      flag:false,
    }
  },
  {
    path: '/logn',
    name: '注册',
    component: () => import('../components/Logon.vue'),
    meta:{
      flag:false,
    }
  },
  {
    path: '/post',
    name: '忘记密码',
    component: () => import('../components/Post.vue'),
    meta:{
      flag:false,
    }
  },
  {
    path: '/xiang',
    name: '详情页面',
    component: () => import('../views/Xiang.vue'),
    meta:{
      flag:false,
    }
  },
  {
    path: '/Dingdan',
    name: '订单页面',
    component: () => import('../views/Dingdan.vue'),
    meta:{
      flag:false,
    }
  },
  {
    path: '/harvest',
    name: '待收获',
    component: () => import('../views/Harvest.vue'),
    meta:{
      flag:false,
    }
  }
]

const router = new VueRouter({
  routes
})

export default router
